<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>云度微信</title>

<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<load href="__PUBLIC__/css/bootstrap.min.css" />
<load href="__PUBLIC__/css/font-awesome.min.css" />

<!--[if IE 7]>
	<load href="__PUBLIC__/css/font-awesome-ie7.min.css" />
<![endif]-->

<!-- fonts -->

<load href="__PUBLIC__/css/jquery-ui-1.10.3.full.min.css" />
<load href="__PUBLIC__/css/ace-fonts.css" />


<load href="__PUBLIC__/css/ace.min.css" />
<load href="__PUBLIC__/css/ace-rtl.min.css" />
<load href="__PUBLIC__/css/ace-skins.min.css" />

<!--[if lte IE 8]>
	<load href="__PUBLIC__/css/ace-ie.min.css" />
<![endif]-->


<load href="__PUBLIC__/js/ace-extra.min.js" />

<!--[if lt IE 9]>
<load href="__PUBLIC__/js/html5shiv.js" />
<load href="__PUBLIC__/js/respond.min.js" />
<![endif]-->
</head>
<script type="text/javascript">
	window.jQuery || document.write("<script src='__PUBLIC__/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
</script>

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='__PUBLIC__/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

<body>
<div class="navbar navbar-default" id="navbar">

    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>
                    <i class="icon-leaf"></i>
                    云度微信---安装程序
                </small>
            </a>
        </div>
    </div>
</div>
<div class="container">
	<div class="row-fluid">
	<div class="span12">
		<div class="widget-box">
			<div class="widget-header widget-header-blue widget-header-flat">
				<h4 class="lighter">安装向导</h4>
			</div>

			<div class="widget-body">
				<div class="widget-main">
					<div id="fuelux-wizard" class="row-fluid" data-target="#step-container">
						<ul class="wizard-steps">
							<li data-target="#step1" class="active">
								<span class="step">1</span>
								<span class="title">环境检测</span>
							</li>

							<li data-target="#step2" class="active">
								<span class="step">2</span>
								<span class="title">程序设置</span>
							</li>

							<li data-target="#step3">
								<span class="step">3</span>
								<span class="title">安装程序</span>
							</li>

						</ul>
					</div>

					<hr />
					<div class="step-content row-fluid position-relative" id="step-container">
						<div class="step-pane" id="step1">
							<div class="row-fluid">
								
							</div>
						</div>

						<div class="step-pane active" id="step2">
							<div class="row-fluid">
								<form class="form-horizontal" >
									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">数据库地址</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input value="localhost" class="width-80" type="text" name="DBHOST"  />
											</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">数据库数据名</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input value="yunduweixin_db" class="width-80" type="text" name="DBNAME"  />
											</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">数据库登录名</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input value="root" class="width-80" type="text" name="DBUSER"  />
											</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">数据库登录密码</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input class="width-80" type="text" name="DBPASSWD"  />
											</span>
										</div>
									</div>
									<hr />

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">管理员帐号</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input class="width-80" type="text" name="account"  />
											</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">管理员邮箱</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input class="width-80" type="email" name="email"  />
											</span>
										</div>
									</div>

									<div class="form-group">
										<label class="col-xs-12 col-sm-3 control-label no-padding-right">登录密码</label>
										<div class="col-xs-12 col-sm-5">
											<span class="block input-icon input-icon-right">
												<input class="width-80" type="text" name="passwd"  />
											</span>
										</div>
									</div>




								</form>
							</div>
						</div>

						<div class="step-pane" id="step3">
							<div class="center">
								<h3 class="blue lighter">正在安装,请稍后...</h3>
							</div>
						</div>

						<div class="step-pane" id="step4">
							<div class="center">
								<h3 class="green">恭喜你.安装完成</h3>
							</div>
						</div>
					</div>

					<hr />
					<div class="row-fluid wizard-actions">
						<a class="btn btn-info check"  href="#">检查配置</a>
						<a class="btn btn-success btn-next disabled"  href="{:U('Install/Index/setup3')}">下一步<i class="icon-arrow-right icon-on-right"></i></a>
					</div>
				</div><!-- /widget-main -->
			</div><!-- /widget-body -->
		</div>
	</div>
</div>


<div>
</div>

<script type="text/javascript">
jQuery(function($) {
	$('a.check').on('click',function(){
		var par = $("form").serialize();
		var url = "{:U('Install/Index/setup2')}";
		$.post(url,par,function(req){
			if (req.status == 0) {
				alert(req.info);
				return false;
			}else if(req.status == 1){
				alert(req.info);
				$('.btn-next').removeClass('disabled');
			}
		})
		return false;
	})
	

})
</script>
</body>
</html>
